<?php
return array(
	'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..',
	'name'=>'Wap Content',
    'language'=>'vi',
	
	'preload'=>array('log'),
	
	'import'=>array(
		'application.models.*',        
        'application.components.*',
        'application.extensions.*', 
        'application.extensions.url.*',                 
        'application.utilities.*', 
        'zii.widgets.CPortlet',
	),

	'defaultController'=>'home',
    
	'modules' => array(
      'wcp',
    ),
	'components'=>array(
		'user'=>array(			
			'allowAutoLogin'=>true,
		),
                  
        'CURL' =>array(
            'class' => 'application.extensions.curl.Curl'
        ),
        
        'db'=>array(
            'connectionString' => 'mysql:host=127.0.0.1;dbname=vtc_mtop',
            'emulatePrepare' => true,
            'username' => 'uvtc_mtop',
            'password' => 'pvtc_mtop!@#456',
            'charset' => 'utf8',
            'class'=>'CDbConnection'                  
        ),
        
        'db_kkt'=>array(
            'connectionString' => 'mysql:host=127.0.0.1;dbname=vtc_kenhkiemtien',
            'emulatePrepare' => true,
            'username' => 'uvtc_kkt2012',
            'password' => 'pvtc_@)!@kkt',
            'charset' => 'utf8',
            'class'=>'CDbConnection'                  
        ),
        
		'errorHandler'=>array(			
            'errorAction'=>'home/error',
        ),
        'urlManager'=>array(
        	'urlFormat'=>'path',
            'showScriptName'=>false,            
            'caseSensitive' => true,
        	'rules'=>array(                                
                
                '/<page:\d+>'=>'home/index',
                '/'=>'home/index',
                '/game-online/'=>'home/gameOnline',
                '/game-online/<page:\d+>'=>'home/gameOnline',
                '/game-offline/'=>'home/gameOffline',
                '/game-offline/<page:\d+>'=>'home/gameOffline',
                '/ung-dung/'=>'home/app',
                '/ung-dung/<page:\d+>'=>'home/app',
                '/t-<type:\d+>-chi-tiet-<id:\d+>'=>'home/detail',
                
                '/clip-hot/'=>'clip/index',
                '/clip-hot/<page:\d+>'=>'clip/index',
                '/clip-new/'=>'clip/new',
                '/clip-new/<page:\d+>'=>'clip/new',
                '/clip-top/'=>'clip/top',
                '/clip-top/<page:\d+>'=>'clip/top',
                '/chuyen-muc/<alias>-<catId:\d+>'=>'clip/category',
                '/chuyen-muc/<alias>-<catId:\d+>/<page:\d+>'=>'clip/category',
                '/<alias>-<id:\d+>/'=>'clip/detail',
                
        	),
        ),
        'cache' => array (
            'class'=>'system.caching.CFileCache',
            /*
            'class' => 'CMemCache',
               'servers'=>array(
            array(
                   'host'=>'localhost',
                'port'=>11211,
                'weight'=>60,
                ),
            ),
            */
        ),
		'log'=>array(
			'class'=>'CLogRouter',
			'routes'=>array(
				array(
					'class'=>'CFileLogRoute',
					'levels'=>'error, warning',
				),
			),
		),
	),
	
	'params'=>require(dirname(__FILE__).'/con_params.php'),
);
